package com.kalvan.web.feign;

import feign.Logger;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.LoggerFactory;

/**
 * feign 日志工厂
 *
 * @author chenliang
 */
@Slf4j
public class FeignLoggerFactory implements org.springframework.cloud.openfeign.FeignLoggerFactory {
    public FeignLoggerFactory() {
        log.info("init FeignLoggerFactory...");
    }

    @Override
    public Logger create(Class<?> type) {
        return new FeignLogger(LoggerFactory.getLogger(type));
    }
}
